import { Map } from "immutable"
import * as types from "../types.js"
const reducer = (state = Map ({
    collapsed : localStorage.getItem('collapsed') === 'true'
}),{ type }) => {
    switch (type) {
        case types.CHANGE_COLLAPSED:
            localStorage.setItem('collapsed' , !state.get('collapsed'))
            return state.set('collapsed' , !state.get('collapsed'))
        default:
            return state
    }
}


export default reducer